USE [ERPSIADB]
GO

/****** Object:  StoredProcedure [dbo].[SP_OBTENER_DETALLES_ASIENTO]    Script Date: 10/30/2010 06:15:24 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[SP_OBTENER_DETALLES_ASIENTO] 
	-- Add the parameters for the stored procedure here
	@IdAsiento INT
AS
BEGIN	
	SELECT (SELECT Detalles.IdDetalle AS 'IdDetalle', Detalles.IdCuenta AS 'IdCuenta', Detalles.MontoAlDebe AS 'TipoCrecimiento',
	Detalles.IdMoneda AS 'Moneda', Detalles.Monto as 'Monto'
	FROM AsientosCuenta Detalles
	WHERE Detalles.IdAsiento = @IdAsiento
	FOR XML PATH('Detalle'), TYPE)
	FOR XML PATH('Detalles')
END


GO


